import dayjs from 'dayjs';
import { ref } from 'vue';

export default function(value: string | Date) {
    const date = ref(value);
    function formateDate() {
        date.value = dayjs(value).format('YYYY/MM/DD h:mm:ss A')
    }

    return {
        date,
        formateDate
    }
}